<h2>DESCRIPTION</h2>

<em>v.net.flow</em> computes the maximum flow and minimum cut 
between two sets of nodes.

<h2>NOTES</h2>
The two sets of nodes are called <em>sources</em> and <em>sink</em> 
and <em>v.net.flow</em> finds the maximum flow from the former to 
the latter ones. Edge capacities can be specified by <b>arc_column</b> 
for forward direction and <b>arc_backward_column</b> for backward direction. If 
the latter parameter is omitted then the same capacity is used in 
either direction. The sets are given by the respective <b>cats</b>, 
<b>layer</b> and <b>where</b> parameters. Maximum flow corresponds 
to the maximum amount of water possibly flowing through the network 
preserving the capacity constraints and minimum cut to the set of edges 
of minimum total capacity completely separating sources from sinks. 
The cut produced by this module corresponds to the first fully 
saturated edges from sources to sinks. An attribute table containing 
the flow information is linked to the <b>output</b> map. The table 
consists of two columns: <em>cat</em> and <em>flow</em> and stores 
the flow along each line. Negative flow means that "water" is 
flowing in the backward direction. <b>Cut</b> map contains the edges 
in the minimum cut.
<br>
A famous <a href="http://en.wikipedia.org/wiki/Max-flow_min-cut_theorem">result</a> 
says that the total amount of water flowing is equal to the minimum 
cut.

<h2>EXAMPLES</h2>

Find maximum flow from factories to stores using SPEED for the capacities.
<div class="code"><pre>
v.net.flow input=roads output=roads_flow cut=roads_cut arc_column=SPEED \
           source_where="type=factory" sink_where="type=store"
</pre></div>
<p>

If all the capacties are one then the minimum cut corresponds to the 
minimum number of edges separating sources from sinks. 
<div class="code"><pre>
v.net.flow input=network output=flow cut=cut arc_column=ones \
           source_cats=1-10 sink_cats=100-100
</pre></div>


<h2>SEE ALSO</h2>

<em>
<a href="v.net.html">v.net</a>,
<a href="v.net.connectivity.html">v.net.connectivity</a>
</em>


<h2>AUTHORS</h2>

Daniel Bundala, Google Summer of Code 2009, Student<br>
Wolf Bergenheim, Mentor

<!--
<p>
<i>Last changed: $Date$</i>
-->
